<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>访问当当购物车页面节点</title>
    <link type="text/css" rel="stylesheet" href="css/cartStyle.css" />
	<script type="text/javascript">
		function close_plan(){
			var con= window.confirm("确定关闭窗口?");
			if(con==true){
				window.close();
			}
		}
		function collection(){
			var col=window.confirm("确定要收藏?");
			if(col==true){
			 alert("收藏成功");
			}else{
				alert("收藏失败");
			}
		}
		/* function accounts(){
			var acc=window.confirm("确定结算?");
			if(acc==true){
				alert("结算成功");
			}else{
				alert("结算失败");
			}
		} */
		function accounts(){
			var a=document.getElementById("price0").innerHTML;
			var b=document.getElementById("price1").innerHTML;
		var c=parseFloat(a.substring(1))+parseFloat(b.substring(1));
		alert(c);
		
			document.getElementById("totalPrice").innerHTML=c;
			/* document.querySelectorAll("li[id*=price]"); */
		}
	</script>
</head>
<body>

<div class="content">
    <div class="logo">
        <img src="images/dd_logo.jpg"><span onclick="close_plan();">关闭</span>
    </div>
    <div class="cartList" id="cartList">
        <ul>
            <li>¥<input type="text" name="price" value="21.90"></li>
            <li><input type="button" name="minus" value="-" onclick="minus(0);"><input type="text" name="amount" value="1"><input type="button" name="plus" value="+" onclick="plus(0);"></li>
            <li id="price0">¥21.90</li>
            <li><p  onclick="collection();">移入收藏</p><p onclick="del();">删除</p></li>
        </ul>
        <ul>
            <li>¥<input type="text" name="price" value="24.00"></li>
            <li><input type="button" name="minus" value="-" onclick="minus(1);"><input type="text" name="amount" value="1"><input type="button" name="plus" value="+" onclick="plus(1);"></li>
            <li id="price1">¥24.00</li>
            <li><p  onclick="collection();">移入收藏</p><p onclick="del();">删除</p></li>
        </ul>
        <ol>
            <li id="totalPrice">&nbsp;</li>
            <li><span onclick="accounts();">结 算</span></li>
        </ol>
    </div>
    <div></div>
</div>
<a href="javascript:void(0)" onclick="window.history.back()">去后退</a>

<!-- <script type="text/javascript" src="js/shopping.js"></script> -->
</body>
</html>